//
//  FourCell.m
//  i优购商城
//
//  Created by 付万溥 on 15/9/15.
//  Copyright (c) 2015年 qianfeng. All rights reserved.
//

#import "FourCell.h"
#import "FirstCell.h"
#import "UIImageView+AFNetworking.h"
@implementation FourCell


- (void)awakeFromNib
{
     [_myCollectionView registerNib:[UINib nibWithNibName:@"FirstCell" bundle:nil] forCellWithReuseIdentifier:@"FirstCell"];
    _myCollectionView.bounces = NO;
}

-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
    return _dataArry.count;
}
-(UICollectionViewCell*)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
    NSDictionary*dic=_dataArry[indexPath.item];
    FirstCell*cell=[collectionView dequeueReusableCellWithReuseIdentifier:@"FirstCell" forIndexPath:indexPath];
    [cell.imgView setImageWithURL:[NSURL URLWithString:dic[@"image"]]];
    cell.lbl1.text=dic[@"title"];
    if (dic[@"subtitle"]) {
        cell.lbl2.text=dic[@"subtitle"];
    }
    UIView*backView=[[UIView alloc]initWithFrame:collectionView.bounds];
    backView.backgroundColor=[UIColor whiteColor];
    cell.backgroundView=backView;
    
    return cell;

}




- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
